<template>
  <!-- html -->
  <div class="person">
    <h2>当前求和为 {{ sum }},sum大十倍后为{{ bigSum }}</h2>
    <button @click="add">点我sum+1</button>
    <hr />
    <img v-for="(mn, index) in dogList" :src="mn" :key="index" />
    <button @click="getDog">再来个修狗</button>
  </div>
</template>

<script lang="ts" setup name="Person">
import useSum from "@/hooks/useSum";
import useDog from "@/hooks/useDog";

const { sum, add, bigSum } = useSum();
const { dogList, getDog } = useDog();

// let x = defineProps(['list'])
</script>
<style scoped>
/* scoped表示样式只能影响到当前.vue的template */
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}
button {
  margin: 0 5px;
}
img {
  height: 200px;
}
</style>
